<template>
	<div id="user_list">
		<el-card click="user_list_box" shadow="never" style="height: 580px;">
			
		</el-card>
	</div>
</template>

<script>
	export default {
	    data() {
	      return {
			  userData:{}
	      };
	    },
	    methods: {
			/**
			 * 初始化登录用户信息
			 */
			initUserData:function(){
				const userParam = sessionStorage.getItem('user')
				const user = JSON.parse(userParam);
				this.userData=user
			},
			/**
			 * 获取用户列表
			 */
			getUserListData:function(){
				console.log('进入加载用户列表方法')
				this.$axios({
				  method: 'post',
				  url: '/user/getUserList',
				  params: {
					account:this.userData.account,
				    role:this.userData.role
				  }
				}).then(res=>{
					console.log(res)
				}).catch(e=>{
					console.log(e)
				})
			}
	    },
		mounted() {
			/**
			 * 加载登录用户信息
			 */
			this.initUserData();
			
			/**
			 * 获取用户列表
			 */
			this.getUserListData();
			
		}
	}	
</script>

<style>
	.user_list_box{
		width: 100%;
	}
	
</style>